package es.us.isa.jdbl.domain.biblio;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.SecondaryTable;
import javax.persistence.SecondaryTables;
import javax.persistence.Table;


@Entity
@SecondaryTables({
	@SecondaryTable(name="content_type_biblio", catalog = "webisa", pkJoinColumns={
			@PrimaryKeyJoinColumn(name="nid", referencedColumnName="nid")}),
})
@DiscriminatorValue("102")
@Table(name="biblio", catalog = "webisa")
public class Article extends Biblio{
	@Column(name="biblio_secondary_title")
	private String journal;
	@Column(name="biblio_volume")
	private String volume;
	@Column(name="biblio_number")
	private String number;
	@Column(name="biblio_pages")
	private String pages;
	@Column(name="biblio_date")
	private String dateOfPublication;
	@Column(name="biblio_tertiary_title")
	private String seriesTitle;
	@Column(name="biblio_issue")
	private String issue;
	@Column(name="biblio_issn")
	private String issn;
	@Column(name="biblio_publisher")
	private String publisher;
	@Column(name="biblio_notes")
	private String notes;
	@Column(name="biblio_place_published")
	private String placePublished;
	@Column(name="field_phdwithhonors_value", table="content_type_biblio")
	private boolean phdWithHonors;
	@Column(name="field_european_thesis_value", table="content_type_biblio")
	private boolean europeanThesis;
	@Embedded
	private QualityArticle quality;
	
	
	public Article(){
		
	}
	
	public String getIssue() {
		return issue;
	}

	public void setIssue(String issue) {
		this.issue = issue;
	}

	public String getIssn() {
		return issn;
	}

	public void setIssn(String issn) {
		this.issn = issn;
	}

	public String getDate() {
		return dateOfPublication;
	}

	public void setDate(String date) {
		this.dateOfPublication = date;
	}

	public void setJournal(String journal) {
		this.journal = journal;
	}

	public String getJournal() {
		return journal;
	}

	public void setVolume(String volume) {
		this.volume = volume;
	}

	public String getVolume() {
		
		if (volume == ""){
			return "1";
		}
		else{
			return volume;
		}
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getNumber() {
		return number;
	}

	public void setPages(String pages) {
		this.pages = pages;
	}

	public String getPages() {
		return pages;
	}

	public void setSeriesTitle(String series) {
		this.seriesTitle = series;
	}

	public String getSeriesTitle() {
		return seriesTitle;
	}

	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}

	public String getPublisher() {
		return publisher;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	public String getNotes() {
		return notes;
	}

	public void setPhdWithHonors(boolean phdWithHonors) {
		this.phdWithHonors = phdWithHonors;
	}

	public boolean getPhdWithHonors() {
		return phdWithHonors;
	}

	public void setEuropeanThesis(boolean europeanThesis) {
		this.europeanThesis = europeanThesis;
	}

	public boolean getEuropeanThesis() {
		return europeanThesis;
	}

	public void setPlacePublished(String placePublished) {
		this.placePublished = placePublished;
	}

	public String getPlacePublished() {
		return placePublished;
	}

	public QualityArticle getQuality() {
		return quality;
	}

	public void setQuality(QualityArticle quality) {
		this.quality = quality;
	}
}
